<?php
/**
 * RedCross Application
 *
 * @copyright Copyright (c) 2010, Kristian Stokke Tryggestad, Rune Vikestad, Andreas Flaten Wist, Simen Nicolai Echholt, Ole Henrik Jahren
 */


class Admin_Form_Course_Edit extends Admin_Form_Course_Basic
{
    const ACTION = 'edit';

    public function init()
    {
        parent::init();

        $action = $this->createElement('hidden','action');
        $action->setValue(self::ACTION);

        $this->addElement($action);
    }

    public function fillForm(Core_Model_Course $course)
    {
        $this->getElement('name')->setValue($course->name);
        $this->getElement('months_valid')->setValue($course->months_valid);
        $this->getElement('type')->setValue($course->type);
    }
}
